const app = getApp()
Component({
  properties: {
    couponData: {
      type: Object,
      value: {},
      observer: function (newVal, oldVal) { }
    }
  },
  lifetimes: {
    attached() {
      // 在组件实例进入页面节点树时执行
      let couponData = this.data.couponData||{}
      couponData.logo = couponData.logo || '../../images/bg_coupon.jpg'
      couponData = {...couponData, ...this.data.couponData}
      console.log(couponData)
      this.setData({couponData})
    },
  }
})